/*
 * @Author: NtyAaron
 * @Date: 2021-04-08 10:27:36
 * @LastEditors: NtyAaron
 * @LastEditTime: 2021-06-23 14:20:30
 * @Description: 停留日数相关api
 * @FilePath: \dwq\api\daysOfStay\daysOfStay.js
 */
import request from '../../utils/request'

// 新增编辑停留日数
export const saveStay = (data) => {
  return request({
    url: '/stay/saveStay',
    method: 'POST',
    data,
  })
}

// 暂停离境
export const stopStay = (data) => {
  return request({
    url: `/stay/stopStay`,
    data,
  })
}

// 删除停留日数
export const delStay = (e) => {
  return request({
    url: `/stay/delStay?stayId=${e}`,
  })
}

// 删除出入境记录
export const delRecord = (e) => {
  return request({
    url: `/stay/delRecord?recordId=${e}`,
  })
}

// 出入境列表（不分页）
export const getRecordList = (e) => {
  return request({
    url: `/stay/getRecordList?stayId=${e.stayId}&userId=${e.userId}`,
  })
}

// 出入境列表（分页）
export const getRecordPage = (e) => {
  return request({
    url: `/stay/getRecordPage?page=${e.page}&size=${e.size}&stayId=${e.stayId}&userId=${e.userId}`,
  })
}

// 停留日数详情
export const getStay = (e) => {
  return request({
    url: `/stay/getStay?userId=${e.userId}`,
  })
}
